package com.uuah.server.config.spring.parsers.specific;

import com.uuah.api.config.IThreadingProfile;
import com.uuah.config.ChainedThreadingProfile;
import com.uuah.server.config.spring.parsers.generic.ChildDefinitionParser;
import com.uuah.server.config.spring.parsers.processors.ConstructorReference;

/**
 * This parser is responsible for processing the
 * <code><threading-profile><code> configuration elements.
 */
public class ThreadingProfileDefinitionParser extends ChildDefinitionParser {

	public ThreadingProfileDefinitionParser(String propertyName, String defaults) {
		super(propertyName, ChainedThreadingProfile.class);
		addMapping("poolExhaustedAction",
				IThreadingProfile.POOL_EXHAUSTED_ACTIONS);
		registerPostProcessor(new ConstructorReference(defaults));
	}

}
